< previous page page_729 next page >

Page 729
Compiling Your Document
After you finish testing and debugging your document, you can compile the document for distribution. To start the compilation process, select Make from Visual Basic's File menu. In the resulting Make dialog box, you can specify the name and location of the EXE or DLL file. The name of the VBD file is based on the Name property of the UserDocument object. This file is placed in the same folder that you specified for the EXE file.
After compilation, your document can be used in any of the programs that handle ActiveX documents. As you learned previously, Internet Explorer is one such program; the Office 97 Binder is another. To access an ActiveX document with the Binder, start the Binder and then select Add from File from the Section menu. This action opens a dialog box that enables you to specify the file to be loaded. Here, you specify the name and location of your VBD file and then click the OK button to load the document.
If you want to put your ActiveX document on the Internet, you first need to run the Packaging and Deployment Wizard with the Internet Package option. The wizard creates a Package subdirectory that contains the following:
A CAB file containing all the required components and DLL files
The VBD file that is used to open the document in Internet Explorer
A Support directory in case you need to rebuild the CAB file manually
A sample HTML file, pictured in Figure 32.7, that shows you how to include your document on a Web page
sarrow.gifSee "Packaging ActiveX Components" p. 788
0729-01.jpg
Figure 32.8
You can copy the 
HREF line from the
sample HTML file to your own Web pages.
Exploring the UserDocument Object
Just as a form is the main part of a standard program, the UserDocument object is the key part of an ActiveX document. The UserDocument provides the canvas for all the controls that make up the user interface of the document. As you can do with a form, you can place controls on the UserDocument, or you can use graphics methods and the Print method to display other information directly on the document. This capability provides great flexibility in the design of your documents and the manner in which you present information to the user.

 
< previous page page_729 next page >